var headerstr = '<a href="./">' +
'<div class="logo">' +
    '<div class="logopic">' +
        '<img src="./images/logo.png" alt="logo">' +
    '</div>' +
    '<div class="logoword">' +
        // '<p style="font-size:22px">LP Consortia</p>' +
        // '<p style="font-size:16px">L P 公 会</p>' +
        '<p id="logoword1">LP Consortia</p>' +
        '<p id="logoword2">L P 公 会</p>' +
    '</div>' +
'</div>' +
'</a>' +
'<div class="menu" id="menu">' +
'<ul>' +
    '<li><a class="" href="./" target="_self">首页</a></li>' +
    '<li><a class="" href="./VCschool" target="_self">VC学院</a></li>' +
    '<li><a class="" href="./teacher" target="_self">导师介绍</a></li>' +
    '<li><a class="" href="./activity" target="_self">公会活动</a></li>' +
    '<li><a class="" href="./aboutlp" target="_self">公会介绍</a></li>' +
'</ul>' +
'</div>'
function mouseover (num) {
  var menua = document.getElementById('menu').getElementsByTagName('ul')[0].getElementsByTagName('a')
  menua[num].setAttribute('class', 'menuover')
  headfill()
  // console.log(menua);
  var Length = menua.length
  for (var i = 0; i < Length; i++) {
    menua[i].onmouseover = function () {
      for (var j = 0; j < Length; j++) {
        menua[j].removeAttribute('class')
      }
      this.setAttribute('class', 'menuover')
    }
  }
}

$(window).resize(function () {
  var fill = document.getElementById('headfill')
  var head = document.getElementById('header')
  fill.style.height = head.clientHeight + 'px'
  // var contactus=document.getElementById('contactus');
  // var container=document.getElementById('container');
  // contactus.style.marginLeft=(container.clientWidth/2-contactus.clientWidth)+'px';
})
function headfill () {
  var fill = document.getElementById('headfill')
  var head = document.getElementById('header')
  fill.style.height = head.clientHeight + 'px'
  // var contactus=document.getElementById('contactus');
  // var container=document.getElementById('container');
  // contactus.style.marginLeft=(container.clientWidth/2-contactus.clientWidth)+'px';
};

function show (id) {
  $('#' + id).show()
}
function hide (id) {
  $('#' + id).hide()
}
